home *** CD-ROM | disk | FTP | other *** search
/ Enter 2003 July / EnterCD 7_2003.iso / Ekstra / GL Force 2001 3.0 / GLFont.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-06-30  |  3.5 KB  |  107 lines

  1. // GLFont.h: interface for the CGLFont class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4.  
  5. #if !defined(AFX_GLFONT_H__1F38C981_2654_11D3_955D_8422F5C00000__INCLUDED_)
  6. #define AFX_GLFONT_H__1F38C981_2654_11D3_955D_8422F5C00000__INCLUDED_
  7.  
  8. #if _MSC_VER >= 1000
  9. #pragma once
  10. #endif // _MSC_VER >= 1000
  11. #include "gl\gl.h"
  12. #include "gl\glu.h"
  13. #include "gl\glaux.h"
  14.  
  15. #define FONTLIST    256
  16.  
  17. enum GLFontType
  18. {
  19.     GL_FONT_SOLID,
  20.     GL_FONT_LINE,
  21. };
  22.  
  23.  
  24. class CGLFont  
  25. {
  26. public:
  27.     CGLFont();
  28.     virtual ~CGLFont();
  29.  
  30.     void   SetFontType(GLFontType FontType){m_FontType = FontType;};
  31.     void   GetFontType(GLFontType* FontType){*FontType = m_FontType;};
  32.  
  33.     void   SetFontSize(double dThick){m_dThick = dThick;};
  34.     void   GetFontSize(double* dThick){*dThick = m_dThick;};
  35.  
  36.     void   SetXOffset(double dXOffset){m_dXOffset = dXOffset;};
  37.     double GetXOffset(void){ return m_dXOffset;};
  38.  
  39.     void   SetYOffset(double dYOffset){m_dYOffset = dYOffset;};
  40.     double GetYOffset(void){ return m_dYOffset;};
  41.  
  42.     void   SetZOffset(double dZOffset){m_dZOffset = dZOffset;};
  43.     double GetZOffset(void){ return m_dZOffset;};
  44.  
  45.     void   SetXScale(double dXScale){m_dXScale = dXScale;};
  46.     double GetXScale(void){ return m_dXScale;};
  47.  
  48.     void   SetYScale(double dYScale){m_dYScale = dYScale;};
  49.     double GetYScale(void){ return m_dYScale;};
  50.  
  51.     void   SetZScale(double dZScale){m_dZScale = dZScale;};
  52.     double GetZScale(void){ return m_dZScale;};
  53.  
  54.     void   SetXRotate(double dXRotate){m_dXRotate = dXRotate;};
  55.     double GetXRotate(void){ return m_dXRotate;};
  56.  
  57.     void   SetYRotate(double dYRotate){m_dYRotate = dYRotate;};
  58.     double GetYRotate(void){ return m_dYRotate;};
  59.  
  60.     void   SetZRotate(double dZRotate){m_dZRotate = dZRotate;};
  61.     double GetZRotate(void){ return m_dZRotate;};
  62.  
  63.     void   SetEmission(float dMEmission[4]);
  64.     void   GetEmission(float dMEmission[4]);
  65.     
  66.     void   SetSpecular(float dMSpecular[4]);
  67.     void   GetSpecular(float dMSpecular[4]);
  68.     
  69.     void   SetAmbient(float dMAmbient[4]); 
  70.     void   GetAmbient(float dMAmbient[4]); 
  71.     
  72.     void   SetDiffuse(float dMDiffuse[4]);
  73.     void   GetDiffuse(float dMDiffuse[4]);
  74.     
  75.     void   SetShininess(float dMShininess);  
  76.     void   GetShininess(float* dMShininess);  
  77.  
  78.     void   SetText(const char* strText){m_strText = strText;};
  79.  
  80.     BOOL CreateFont(CDC* pDrawDC, char* fontname);
  81.     void GLDrawText(void);
  82.  
  83. //Parameters
  84. private:
  85.     GLFontType   m_FontType;     //font type
  86.     UINT         m_uiListID;     //the ID of the displaylist
  87.     double       m_dThick;       //the letters thick 
  88.     double       m_dXOffset;     //the offset in X direction
  89.     double       m_dYOffset;     //the offset in Y direction
  90.     double       m_dZOffset;     //the offset in Z direction
  91.     double       m_dXScale;      //the scale in X direction
  92.     double       m_dYScale;      //the scale in Y direction
  93.     double       m_dZScale;      //the scale in Z direction
  94.     double       m_dXRotate;     //the rotation around X-axis 
  95.     double       m_dYRotate;     //the rotation around Y-axis 
  96.     double       m_dZRotate;     //the rotation around Z-axis 
  97.     float        m_dMEmission[4];//the material emission of the font 
  98.     float        m_dMSpecular[4];//the material specular of the font
  99.     float        m_dMAmbient[4]; //the material ambient of the font
  100.     float        m_dMDiffuse[4]; //the material diffuse of the font 
  101.     float        m_dMShininess;  //the material diffuse of the font 
  102.     CString      m_strText;      //the text for display
  103.     
  104. };
  105.  
  106. #endif // !defined(AFX_GLFONT_H__1F38C981_2654_11D3_955D_8422F5C00000__INCLUDED_)
  107.